
************************************************************
*  Regressions in Online Appendix Table 4
************************************************************

clear
# delimit ;
version 11;
capture log close;
set more 1;

use data_5yr_stacked;
log using table_appendix4.log, replace;

quietly tab regno, gen(reg);
quietly tab agegroup, gen(agegroup);

gen lgreg=0;
replace lgreg=1 if north==1;
replace lgreg=2 if norwest==1;
replace lgreg=3 if central==1;
replace lgreg=3 if regno==16;
replace lgreg=4 if cenchern==1;
replace lgreg=5 if volga==1;
replace lgreg=6 if povolzh==1;
replace lgreg=7 if ncauc==1;
replace lgreg=8 if urals==1;
replace lgreg=9 if esib==1;
replace lgreg=10 if wsib==1;
replace lgreg=11 if fareast==1;

gen time=0 if agegroup==1;
replace time=1 if agegroup==2;
replace time=2 if agegroup==3;
replace time=3 if agegroup==4;
replace time=4 if agegroup==5;
replace time=5 if agegroup==6;
replace time=6 if agegroup==7;

*  Married fertility rates;
*  Age 16-44;
*  Unweighted;
reg asbrm sr10a epopf asdrf lnpopm urbshf i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);
reg asbrmu sr10u epopfu asdrfu lnpopmu i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);
reg asbrmr sr10r epopfr asdrfr lnpopmr i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);
* Weighted;
reg asbrm sr10a epopf asdrf lnpopm urbshf i.agegroup i.regno i.regno#c.time if agegroup !=7 [aw=popf], cluster(regno);
reg asbrmu sr10u epopfu asdrfu lnpopmu i.agegroup i.regno i.regno#c.time if agegroup !=7 [aw=popfu], cluster(regno);
reg asbrmr sr10r epopfr asdrfr lnpopmr i.agegroup i.regno i.regno#c.time if agegroup !=7 [aw=popfr], cluster(regno);

*  Unmarried fertility rates;
*  Unweighted;
reg asbrnd sr10a epopf asdrf lnpopm urbshf i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);
reg asbrndu sr10u epopfu asdrfu lnpopmu i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);
reg asbrndr sr10r epopfr asdrfr lnpopmr i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);
* Weighted;
reg asbrnd sr10a epopf asdrf lnpopm urbshf i.agegroup i.regno i.regno#c.time if agegroup !=7 [aw=popf], cluster(regno);
reg asbrndu sr10u epopfu asdrfu lnpopmu i.agegroup i.regno i.regno#c.time if agegroup !=7 [aw=popfu], cluster(regno);
reg asbrndr sr10r epopfr asdrf lnpopmr i.agegroup i.regno i.regno#c.time if agegroup !=7 [aw=popfr], cluster(regno);

*  % Out-of-wedlock births;
*  Unweighted;
reg nodad sr10a epopf asdrf lnpopm urbshf i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);
reg nodadu sr10u epopfu asdrfu lnpopmu i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);
reg nodadr sr10r epopfr asdrfr lnpopmr i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);
* Weighted;
reg nodad sr10a epopf asdrf lnpopm urbshf i.agegroup i.regno i.regno#c.time if agegroup !=7 [aw=popf], cluster(regno);
reg nodadu sr10u epopfu asdrfu lnpopmu i.agegroup i.regno i.regno#c.time if agegroup !=7 [aw=popfu], cluster(regno);
reg nodadr sr10r epopfr asdrfr lnpopmr i.agegroup i.regno i.regno#c.time if agegroup !=7 [aw=popfr], cluster(regno);
clear;


*  Divorce regressions (diffeent age groups than previous regressions);
use data_5yr_stacked_div;

gen time=0 if agegroup==1;
replace time=1 if agegroup==2;
replace time=2 if agegroup==3;
replace time=3 if agegroup==4;
replace time=4 if agegroup==5;

quietly tab agegroup, gen(agegroup);

gen lgreg=0;
replace lgreg=1 if north==1;
replace lgreg=2 if norwest==1;
replace lgreg=3 if central==1;
replace lgreg=3 if regno==16;
replace lgreg=4 if cenchern==1;
replace lgreg=5 if volga==1;
replace lgreg=6 if povolzh==1;
replace lgreg=7 if ncauc==1;
replace lgreg=8 if urals==1;
replace lgreg=9 if esib==1;
replace lgreg=10 if wsib==1;
replace lgreg=11 if fareast==1;

gen lnpop=log(pop);
gen lnpopu=log(popu);
gen lnpopr=log(popr);
gen urbsh=(popmu+popfu)/(popm+popf) ;

*  Age 18-49;
*  Divorces per 1000 married population in each age group;
*  Unweighted;
reg divr sr10a epopf asdrf lnpop urbsh i.agegroup i.regno i.regno#c.time, cluster(regno);
reg divru sr10u epopfu asdrfu lnpopu i.agegroup i.regno i.regno#c.time, cluster(regno);
reg divrr sr10r epopfr asdrfr lnpopr i.agegroup i.regno i.regno#c.time, cluster(regno);
*  Weighted;
reg divr sr10a epopf asdrf lnpop urbsh i.agegroup i.regno i.regno#c.time [aw=pop], cluster(regno);
reg divru sr10u epopfu asdrfu lnpopu i.agegroup i.regno i.regno#c.time [aw=popu], cluster(regno);
reg divrr sr10r epopfr asdrfr lnpopr i.agegroup i.regno i.regno#c.time [aw=popr], cluster(regno);
clear;


*  Deaths from abortion regressions (diffeent age groups than previous regressions);
*  Abortion death data are for 16-19, 20-24, 25-29, 30-39 and 40-49 age groups;
*  No urban abortion death data 1959 for Chechnya --  missing from archives;
*  And no rural abortion data 1959 for Astrakhanskaya oblast and Khabarovskii krai;

use data_5yr_stacked_dabo;
sort agegroup;

gen time=0 if agegroup==1;
replace time=1 if agegroup==2;
replace time=2  if agegroup==3;
replace time=3 if agegroup==4;
replace time=4 if agegroup==5;

quietly tab regno, gen(reg);
quietly tab agegroup, gen(agegroup);

gen lgreg=0;
replace lgreg=1 if north==1;
replace lgreg=2 if norwest==1;
replace lgreg=3 if central==1;
replace lgreg=3 if regno==16;
replace lgreg=4 if cenchern==1;
replace lgreg=5 if volga==1;
replace lgreg=6 if povolzh==1;
replace lgreg=7 if ncauc==1;
replace lgreg=8 if urals==1;
replace lgreg=9 if esib==1;
replace lgreg=10 if wsib==1;
replace lgreg=11 if fareast==1;

*  Age 16-49;
*  Unweighted;
reg dabobth sr10a epopf asdrf lnpopm urbshf i.agegroup i.regno i.regno#c.time, cluster(regno);
reg dabobthu sr10u epopfu asdrfu lnpopmu i.agegroup i.regno i.regno#c.time, cluster(regno);
reg dabobthr sr10r epopfr asdrfr lnpopmr i.agegroup i.regno i.regno#c.time, cluster(regno);
* Weighted;
reg dabobth sr10a epopf asdrf lnpopm urbshf i.agegroup i.regno i.regno#c.time [aw=popf], cluster(regno);
reg dabobthu sr10u epopfu asdrfu lnpopmu i.agegroup i.regno i.regno#c.time [aw=popfu], cluster(regno);
reg dabobthr sr10r epopfr asdrfr lnpopmr i.agegroup i.regno i.regno#c.time [aw=popfr], cluster(regno);

log close;




